#include<iostream>
#include<stdio.h>
#include<vector>
using namespace std;
string fun(string s);
int main(){
	int n;
	char s1[100];
	cin>>n;
	sprintf(s1,"%d",n);
	string s2=s1;
	vector<string>ss;
	ss.push_back(s2);
	while(s2!=fun(s2)){
		int x,y;
		sscanf(s2.c_str(),"%d",&x);
		sscanf(fun(s2).c_str(),"%d",&y);
		x+=y;
		sprintf(s1,"%d",x);
		s2=s1;
		ss.push_back(s2);
	}
	int m=ss.size();
	cout<<m-1<<endl;
	cout<<ss[0];
	for(int i=1;i<m;++i){
		cout<<"--->"<<ss[i];
	}
	return 0;
}
string fun(string s){
	string s1="";
	for(int i=s.size()-1;i>=0;--i)s1+=s[i];
	return s1;
}